package com.whq.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.whq.dao.BusinessMapper;
import com.whq.entity.Business;
import com.whq.service.BusinessService;

@Service(value = "tdBusinessService")
public class BusinessServiceImpl implements BusinessService {

    @Autowired
    private BusinessMapper<Business>tdBusinessMapper;
    
    @Override
    public Integer insertSelective(Business tdBusiness) throws Exception {
           return this.tdBusinessMapper.insertSelective(tdBusiness);
        }

    @Override
    public Integer insertBatch(List<Business> tdBusiness) throws Exception {
           return this.tdBusinessMapper.insertBatch(tdBusiness) ;
        }

    @Override
    public Integer deleteByPrimaryKey(Object id) {
            return this.tdBusinessMapper.deleteByPrimaryKey(id);
    }

    public Integer deleteBatchByPrimaryKey(List<Object> ids) {
           return this.tdBusinessMapper.deleteBatchByPrimaryKey(ids);
    }

    @Override
    public Integer updateByPrimaryKeySelective(Business tdBusiness) {
           return this.tdBusinessMapper.updateByPrimaryKeySelective(tdBusiness);
    }

    @Override
    public Business findById(Object id) {
           return (Business) this.tdBusinessMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<Business> selectByCondition(Business tdBusiness) {
           return (List<Business>) this.tdBusinessMapper.selectByCondition(tdBusiness);
    }

    @Override
    public Integer selectCountByCondition(Business tdBusiness) {
           return  this.tdBusinessMapper.selectCountByCondition(tdBusiness);
    }

}
